home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 11: TSX-11 / Linux Cubed Series 11 - TSX-11 Vol 1.iso / sbin / tcp_wrap.3 / tcp_wrap / Makefile < prev    next >
Encoding:
Makefile  |  1996-11-30  |  23.1 KB  |  625 lines

  1. # @(#) Makefile 1.12 94/03/23 16:51:32
  2.  
  3. what:
  4.     @echo
  5.     @echo "Usage: edit the REAL_DAEMON_DIR definition in the Makefile then:"
  6.     @echo
  7.     @echo "    make sys-type"
  8.     @echo
  9.     @echo "If you are in a hurry you can try instead:"
  10.     @echo
  11.     @echo "    make REAL_DAEMON_DIR=/foo/bar sys-type"
  12.     @echo
  13.     @echo "And for a version with language extensions enabled:"
  14.     @echo
  15.     @echo "    make REAL_DAEMON_DIR=/foo/bar STYLE=-DPROCESS_OPTIONS sys-type"
  16.     @echo
  17.     @echo "This Makefile knows about the following sys-types:"
  18.     @echo
  19.     @echo "    generic (most bsd-ish systems with sys5 compatibility)"
  20.     @echo "    386bsd aix alpha apollo convex-ultranet dell-gcc dgux dynix"
  21.     @echo "    epix esix freebsd hpux irix4 isc(untested) linux"
  22.     @echo "    mips(untested) netbsd next osf ptx-2.x ptx-generic pyramid"
  23.     @echo "    sco sco-nis sco-od2 sunos4 sunos40 sunos5 sysv4 ultrix"
  24.     @echo "    unicos(untested) uxp"
  25.     @echo
  26.     @echo "If none of these match your environment, edit the system"
  27.     @echo "dependencies sections in the Makefile and do a 'make other'."
  28.     @echo
  29.  
  30. #######################################################
  31. # Choice between easy and advanced installation recipe.
  32. # Advanced installation: vendor-provided daemons are left alone, and the
  33. # inetd configuration file is edited. In this case, the REAL_DAEMON_DIR
  34. # macro should reflect the actual directory with (most of) your
  35. # vendor-provided network daemons.  These names can be found in the
  36. # inetd.conf file. Usually, the telnet, ftp and finger daemons all live
  37. # in the same directory.
  38. # Uncomment the appropriate line if you are going to edit inetd.conf.
  39. #
  40. # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
  41. #REAL_DAEMON_DIR=/usr/etc
  42. #
  43. # SysV.4 Solaris 2.x OSF AIX
  44. #REAL_DAEMON_DIR=/usr/sbin
  45. #
  46. # BSD 4.4
  47. #REAL_DAEMON_DIR=/usr/libexec
  48. #
  49. # HP-UX SCO
  50. #REAL_DAEMON_DIR=/etc
  51.  
  52. # Easy installation: vendor-provided network daemons are moved to "some
  53. # other" directory, and the tcpd wrapper fills in the "holes". For this
  54. # mode of operation, the REAL_DAEMON_DIR macro should be set to the "some
  55. # other" directory.  The "..." is here for historical reasons only; you
  56. # should probably use some other name. 
  57. # Uncomment the appropriate line if you are going to move your daemons.
  58. #
  59. # Ultrix 4.x SunOS 4.x ConvexOS 10.x Dynix/ptx
  60. #REAL_DAEMON_DIR=/usr/etc/...
  61. #
  62. # SysV.4 Solaris 2.x OSF AIX
  63. #REAL_DAEMON_DIR=/usr/sbin/...
  64. #
  65. # BSD 4.4
  66. #REAL_DAEMON_DIR=/usr/libexec/...
  67. #
  68. # HP-UX SCO
  69. #REAL_DAEMON_DIR=/etc/...
  70.  
  71. # End of mandatory section
  72. ##########################
  73.  
  74. ##########################################
  75. # Ready-to-use system-dependent templates.
  76. #
  77. # Ready-to-use templates are available for many systems (see the "echo"
  78. # commands at the start of this Makefile).  The templates take care of
  79. # all system dependencies: after editing the REAL_DAEMON_DIR definition
  80. # above, do a "make sunos4" (or whatever system type is appropriate).
  81. #
  82. # If your system is not listed (or something that comes close enough), you
  83. # will have to edit the system depencies section below and do a "make other".  
  84. #
  85. # Send templates for other UNIX versions to wietse@wzv.win.tue.nl.
  86.  
  87. # This is good for many BSD+SYSV hybrids with NIS (formerly YP).
  88. generic sunos4 aix osf alpha dynix:
  89.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  90.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
  91.     NETGROUP=-DNETGROUP TLI= all
  92.  
  93. # The NeXT loader needs "-m" or it barfs on redefined library functions.
  94. next:
  95.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  96.     LIBS=-m RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
  97.     NETGROUP=-DNETGROUP TLI= all
  98.  
  99. # SunOS for the 386 was frozen at release 4.0.x.
  100. sunos40:
  101.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  102.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o strcasecmp.o" \
  103.     NETGROUP=-DNETGROUP TLI= all
  104.  
  105. # Ultrix is like sunos4, aix, next, etc., but has miscd, too.
  106. ultrix:
  107.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  108.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
  109.     NETGROUP=-DNETGROUP TLI= all miscd
  110.  
  111. # This works on EP/IX 1.4.3 and will likely work on Mips (reggers@julian.uwo.ca)
  112. epix:
  113.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  114.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
  115.     NETGROUP=-DNETGROUP TLI= SYSTYPE="-systype bsd43" all
  116.  
  117. # Free bsd and linux by default have no NIS.
  118. 386bsd netbsd freebsd:
  119.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  120.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ= NETGROUP= TLI= all
  121.  
  122. linux:
  123.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  124.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
  125.     NETGROUP= TLI= EXTRA_CFLAGS="-DBROKEN_SO_LINGER" all
  126.  
  127. # This is good for many SYSV+BSD hybrids with NIS, probably also for HP-UX 7.x.
  128. hpux hpux8 hpux9:
  129.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  130.     LIBS= RANLIB=echo ARFLAGS=rv AUX_OBJ=environ.o \
  131.     NETGROUP=-DNETGROUP TLI= all
  132.  
  133. # ConvexOS-10.x with UltraNet support (ukkonen@csc.fi).
  134. convex-ultranet:
  135.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  136.     LIBS=-lulsock RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
  137.     NETGROUP=-DNETGROUP TLI= all
  138.  
  139. # Generic support for the Dynix/PTX version of TLI.
  140. ptx-generic:
  141.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  142.     LIBS="-lsocket -linet -lnsl" RANLIB=echo ARFLAGS=rv \
  143.     AUX_OBJ="environ.o strcasecmp.o ptx.o" NETGROUP= TLI=-DPTX all
  144.  
  145. # With UDP support optimized for PTX 2.x (timw@sequent.com).
  146. ptx-2.x:
  147.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  148.     LIBS="-lsocket -linet -lnsl" RANLIB=echo ARFLAGS=rv \
  149.     AUX_OBJ="environ.o strcasecmp.o tli-sequent.o" NETGROUP= \
  150.     TLI=-DTLI_SEQUENT all
  151.  
  152. # IRIX 4.0.x has a special ar(1) flag.
  153. irix4:
  154.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  155.     LIBS=-lsun RANLIB=echo ARFLAGS=rvs AUX_OBJ=environ.o \
  156.     NETGROUP=-DNETGROUP TLI= all
  157.  
  158. # SunOS 5.x is close enough to generic System V.4
  159. sunos5 esix sysv4:
  160.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  161.     LIBS="-lsocket -lnsl" RANLIB=echo ARFLAGS=rv \
  162.     NETGROUP=-DNETGROUP AUX_OBJ=environ.o TLI=-DTLI all
  163.  
  164. # DG/UX 5.4.1 is like SYSV.4 but slightly different.
  165. dgux:
  166.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  167.     LIBS=-lnsl RANLIB=echo ARFLAGS=rv \
  168.     NETGROUP=-DNETGROUP AUX_OBJ=environ.o TLI=-DTLI \
  169.     BUGS="$(BUGS) -DINET_ADDR_BUG" all
  170.  
  171. # UXP/DS System V.4 clone (vic@uida0.uida.es).
  172. uxp:
  173.     @make LIBS="-L/usr/ucblib -lsocket -lnsl -lucb" \
  174.     RANLIB=echo ARFLAGS=rv NETGROUP=-DNETGROUP \
  175.     AUX_OBJ=environ.o TLI="-DTLI -DDRS_XTI" all
  176.  
  177. # DELL System V.4 Issue 2.2 using gcc (kim@grendel.lut.fi, jurban@norden1.com)
  178. dell-gcc:
  179.     @make LIBS="-lsocket -lnsl" RANLIB=ranlib ARFLAGS=rv CC=gcc \
  180.     AUX_OBJ="environ.o strcasecmp.o" TLI=-DTLI all
  181.  
  182. # SCO 3.2v4.1 no frills (jedwards@sol1.solinet.net).
  183. sco:
  184.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  185.     LIBS="-lsocket -lnsl_s" RANLIB=echo ARFLAGS=rv \
  186.     NETGROUP= AUX_OBJ=environ.o TLI= all
  187.  
  188. # SCO OpenDesktop 2.0, release 3.2 (peter@midnight.com).
  189. sco-od2:
  190.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  191.     LIBS="-lrpcsvc -lrpc -lyp -lrpc -lrpcsvc -lsocket" \
  192.     RANLIB=echo ARFLAGS=rv AUX_OBJ=environ.o \
  193.     NETGROUP=-DNETGROUP TLI= all
  194.  
  195. # SCO 3.2v4.2 with TCP/IP 1.2.1 (Eduard.Vopicka@vse.cz)
  196. sco-nis:
  197.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  198.     LIBS="-lyp -lrpc -lsocket -lyp -lc_s -lc" \
  199.     RANLIB=echo ARFLAGS=rv AUX_OBJ=environ.o \
  200.     NETGROUP=-DNETGROUP TLI= EXTRA_CFLAGS="-nointl" all
  201.  
  202. # Domain SR10.4. Build under bsd, run under either sysv3 or bsd43.
  203. apollo:
  204.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  205.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
  206.     NETGROUP=-DNETGROUP TLI= SYSTYPE="-A run,any -A sys,any" all
  207.  
  208. # Pyramid OSx 5.1, using the BSD universe.
  209. pyramid:
  210.     @make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  211.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ="environ.o vfprintf.o" \
  212.     STRINGS="-Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy" \
  213.     NETGROUP="-DNETGROUP -DUSE_GETDOMAIN" TLI= all
  214.  
  215. # Untested.
  216. mips:
  217.     @echo "Warning: some definitions may be wrong."
  218.     make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  219.     LIBS= RANLIB=ranlib ARFLAGS=rv AUX_OBJ=environ.o \
  220.     NETGROUP=-DNETGROUP TLI= SYSTYPE="-sysname bsd43" all
  221.  
  222. # Untested.
  223. isc:
  224.     @echo "Warning: some definitions may be wrong."
  225.     make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  226.     LIBS="-linet -lnsl_s -ldbm" RANLIB=echo ARFLAGS=rv \
  227.     AUX_OBJ="environ.o strcasecmp.o" NETGROUP= TLI= all
  228.  
  229. # Untested. Borrow me a Cray?
  230. unicos:
  231.     @echo "Warning: some definitions may be wrong."
  232.     make REAL_DAEMON_DIR=$(REAL_DAEMON_DIR) STYLE=$(STYLE) \
  233.     LIBS=-lnet RANLIB=echo ARFLAGS=rv \
  234.     AUX_OBJ="environ.o strcasecmp.o" NETGROUP= TLI= all
  235.  
  236. ###############################################################
  237. # System dependencies: TLI (transport-level interface) support.
  238. # Uncomment the following macro if your system has System V.4-style TLI
  239. # support (/usr/include/sys/timod.h, /etc/netconfig, and the netdir(3)
  240. # routines).
  241. #
  242. #TLI    = -DTLI
  243.  
  244. ###############################################################################
  245. # System dependencies: differences between ranlib(1) and ar(1) implementations.
  246. #
  247. # Some C compilers (Ultrix 4.x) insist that ranlib(1) be run on an object
  248. # library; some don't care as long as the modules are in the right order;
  249. # some systems don't even have a ranlib(1) command. Make your choice.
  250.  
  251. RANLIB    = ranlib    # have ranlib (BSD-ish UNIX)
  252. #RANLIB    = echo        # no ranlib (SYSV-ish UNIX)
  253.  
  254. ARFLAGS    = rv        # most systems
  255. #ARFLAGS= rvs        # IRIX 4.0.x
  256.  
  257. #############################################################################
  258. # System dependencies: routines that are not present in the system libraries.
  259. # If your system library does not have set/putenv(), strcasecmp() or strtok(),
  260. # use the ones provided with this source distribution. The environ.c module
  261. # implements setenv(), getenv(), and putenv().
  262.  
  263. AUX_OBJ= environ.o
  264. #AUX_OBJ= environ.o strcasecmp.o
  265. #AUX_OBJ= environ.o strcasecmp.o strtok.o
  266.  
  267. # Uncomment the following if your C library does not provide the
  268. # strchr/strrchr/memcmp routines, but comes with index/rindex/bcmp.  If
  269. # that is the case, you probably also do not have strtok() (see above).
  270. #
  271. #STRINGS= -Dstrchr=index -Dstrrchr=rindex -Dmemcmp=bcmp -Dno_memcpy
  272.  
  273. #################################################################
  274. # System dependencies: selection of non-default object libraries.
  275. #
  276. # Most System V implementations require that you explicitly specify the
  277. # networking libraries. There is no general consensus, though.
  278. #
  279. #LIBS    = -lsocket -lnsl        # SysV.4 Solaris 2.x
  280. #LIBS    = -lsun                # IRIX
  281. #LIBS    = -lsocket -linet -lnsl -lnfs    # PTX
  282. #LIBS    = -linet -lnsl_s -ldbm        # ISC
  283. #LIBS    = -lnet                # Unicos
  284. #LIBS    = -linet -lsyslog -ldbm
  285. #LIBS    = -lsyslog -lsocket -lnsl
  286.  
  287. ######################################################
  288. # System dependencies: system-specific compiler flags.
  289. #
  290. # Apollo Domain/OS offers both bsd and sys5 environments, sometimes
  291. # on the same machine.  If your Apollo is primarily sys5.3 and also
  292. # has bsd4.3, uncomment the following to build under bsd and run under
  293. # either environment.
  294. #
  295. #SYSTYPE= -A run,any -A sys,any
  296.  
  297. # For MIPS RISC/os 4_52.p3, uncomment the following definition.
  298. #
  299. #SYSTYPE= -sysname bsd43
  300.  
  301. ##################################################
  302. # System dependencies: working around system bugs.
  303. #
  304. # -DGETPEERNAME_BUG works around a getpeername(2) bug in some versions of
  305. # Apollo or SYSV.4 UNIX:  the wrapper would report that all UDP requests
  306. # come from address 0.0.0.0. The workaround does no harm on other systems.
  307. #
  308. # -DBROKEN_FGETS works around an fgets(3) bug in some System V versions
  309. # (IRIX):  fgets() gives up too fast when reading from a network socket.
  310. # The workaround does no harm on other systems.
  311. #
  312. # DG/UX 5.4.1 comes with an inet_ntoa() function that returns a structure
  313. # instead of a long integer. Compile with -DINET_ADDR_BUG to work around
  314. # this mutant behavour.
  315.  
  316. BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS
  317. #BUGS = -DGETPEERNAME_BUG -DBROKEN_FGETS -DINET_ADDR_BUG
  318.  
  319. ##########################################################################
  320. # System dependencies: whether or not your system has NIS (or YP) support.
  321. #
  322. # If your system supports NIS or YP-style netgroups, enable the following
  323. # macro definition. Netgroups are used only for host access control.
  324. #
  325. #NETGROUP= -DNETGROUP
  326.  
  327. # End of the system dependencies.
  328. #################################
  329.  
  330. ##############################
  331. # Start of the optional stuff.
  332.  
  333. ###########################################
  334. # Optional: Turning on language extensions
  335. #
  336. # Instead of the default access control language that is documented in
  337. # the hosts_access.5 document, the wrappers can be configured to
  338. # implement an extensible language documented in the hosts_options.5
  339. # document.  This language is implemented by the "options.c" source
  340. # module, which also gives hints on how to add your own extensions.
  341. # Uncomment the next definition to turn on the language extensions.
  342. #STYLE    = -DPROCESS_OPTIONS    # Enable language extensions.
  343.  
  344. ################################################################
  345. # Optional: Changing the default disposition of logfile records
  346. #
  347. # By default, logfile entries are written to the same file as used for
  348. # sendmail transaction logs. See your /etc/syslog.conf file for actual
  349. # path names of logfiles. The tutorial section in the README file
  350. # gives a brief introduction to the syslog daemon.
  351. # Change the FACILITY definition below if you disagree with the default
  352. # disposition. Some syslog versions (including Ultrix 4.x) do not provide
  353. # this flexibility.
  354. # If nothing shows up on your system, it may be that the syslog records
  355. # are sent to a dedicated loghost. It may also be that no syslog daemon
  356. # is running at all. The README file gives pointers to surrogate syslog
  357. # implementations for systems that have no syslog library routines or
  358. # no syslog daemons. When changing the syslog.conf file, remember that
  359. # there must be TABs between fields.
  360. #
  361. # The LOG_XXX names below are taken from the /usr/include/syslog.h file.
  362.  
  363. FACILITY= LOG_MAIL    # LOG_MAIL is what most sendmail daemons use
  364.  
  365. # The syslog priority at which successful connections are logged.
  366.  
  367. SEVERITY= LOG_INFO    # LOG_INFO is normally not logged to the console
  368.  
  369. ###########################
  370. # Optional: Reduce DNS load
  371. #
  372. # When looking up the address for a host.domain name, the typical DNS
  373. # server will first append substrings of your own domain, so it tries
  374. # host.domain.your.own.domain, then host.domain.own.domain, and then
  375. # host.domain. The APPEND_DOT feature stops this waste of cycles. It is
  376. # off by default because it causes problems on sites that don't use DNS.
  377. #
  378. # This feature has undergone light testing and it may go away if there
  379. # are problems with it. If you enable it let me know if it helps.
  380. #
  381. # DOT= -DAPPEND_DOT
  382.  
  383. ##################################################
  384. # Optional: Always attempt remote username lookups
  385. #
  386. # By default, the wrappers look up the remote username only when the
  387. # access control rules require them to do so.
  388. #
  389. # Username lookups require that the remote host runs a daemon that
  390. # supports an RFC 931 like protocol.  Remote user name lookups are not
  391. # possible for UDP-based connections, and can cause noticeable delays
  392. # with connections from non-UNIX PCs.  On some systems, remote username
  393. # lookups can trigger a kernel bug, causing loss of service. The README
  394. # file describes how to find out if your UNIX kernel has that problem.
  395. # Uncomment the following definition if the wrappers should always
  396. # attempt to get the remote user name. If this is not enabled you can
  397. # still do selective username lookups as documented in the hosts_access.5
  398. # and hosts_options.5 manual pages (`nroff -man' format).
  399. #
  400. #AUTH    = -DALWAYS_RFC931
  401. #
  402. # The default username lookup timeout is 10 seconds. This may not be long
  403. # enough for slow hosts or networks, but is enough to irritate PC users.
  404.  
  405. RFC931_TIMEOUT = 10
  406.  
  407. ######################################################
  408. # Optional: Changing the default file protection mask
  409. #
  410. # On many systems, network daemons and other system processes are started
  411. # with a zero umask value, so that world-writable files may be produced.
  412. # It is a good idea to edit your /etc/rc* files so that they begin with
  413. # an explicit umask setting.  On our site we use `umask 022' because it
  414. # does not break anything yet gives adequate protection against tampering.
  415. # The following macro specifies the default umask for processes run under
  416. # control of the daemon wrappers. Comment it out only if you are certain
  417. # that inetd and its children are started with a safe umask value.
  418.  
  419. UMASK    = -DDAEMON_UMASK=022
  420.  
  421. #######################################
  422. # Optional: Turning off access control
  423. #
  424. # By default, host access control is enabled.  To disable host access
  425. # control, comment out the following definition.  Host access control
  426. # can also be turned off at runtime by providing no or empty access
  427. # control tables.
  428.  
  429. ACCESS    = -DHOSTS_ACCESS
  430.  
  431. ########################################################
  432. # Optional: Changing the access control table pathnames
  433. #
  434. # The HOSTS_ALLOW and HOSTS_DENY macros define where the programs will
  435. # look for access control information. Watch out for the quotes and
  436. # backslashes when you make changes.
  437.  
  438. TABLES    = -DHOSTS_DENY=\"/etc/hosts.deny\" -DHOSTS_ALLOW=\"/etc/hosts.allow\"
  439.  
  440. ###########################################
  441. # Optional: Turning off host NAME checking
  442. #
  443. # By default, the software tries to protect against hosts that claim to
  444. # have someone elses host name. This is relevant for network services
  445. # whose authentication depends on host names, such as rsh and rlogin.
  446. #
  447. # With paranoid mode on, connections will be rejected when the host name
  448. # does not match the host address. Connections will also be rejected when
  449. # the host name is available but cannot be verified.
  450. #
  451. # Comment out the following definition if you do not need this additional
  452. # protection. If paranoid mode is off, and a host name check fails, the
  453. # daemon wrappers will use only the host address, but your daemons may
  454. # still use the host name.
  455.  
  456. PARANOID= -DPARANOID
  457.  
  458. #############################################
  459. # Optional: Turning on host ADDRESS checking
  460. #
  461. # Optionally, the software tries to protect against hosts that pretend to
  462. # have someone elses host address. This is relevant for network services
  463. # whose authentication depends on host names, such as rsh and rlogin,
  464. # because the network address is used to look up the remote host name.
  465. # The protection is effective only when the offending host claims to have
  466. # a network address that lies outside its own network.
  467. #
  468. # My site has been running rlogind and rshd daemons that implement this
  469. # feature for more than 2 years, and without any ill effects.
  470. #
  471. # This feature cannot be used with SunOS 4.x because of a kernel bug in
  472. # the implementation of the getsockopt() system call. Kernel panics have
  473. # been observed for SunOS 4.1.[1-3]. Symptoms are "BAD TRAP" and "Data
  474. # fault" while executing the tcp_ctloutput() kernel function.
  475. #
  476. # Reportedly, Sun patch 100804-03 fixes the problem for SunOS 4.1.x.
  477. #
  478. # Uncomment the following macro definition if your getsockopt() is OK.
  479. #
  480. # KILL_OPT= -DKILL_IP_OPTIONS
  481.  
  482. ## End configuration options
  483. ############################
  484.  
  485. # Protection against weird shells or weird make programs.
  486.  
  487. SHELL    = /bin/sh
  488. .c.o:;    $(CC) $(CFLAGS) -c $*.c
  489.  
  490. CFLAGS    = -O -DFACILITY=$(FACILITY) $(ACCESS) $(PARANOID) $(NETGROUP) \
  491.     $(BUGS) $(SYSTYPE) $(AUTH) $(UMASK) \
  492.     -DREAL_MISCD=\"$(REAL_DAEMON_DIR)/miscd\" \
  493.     -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" $(STYLE) $(KILL_OPT) \
  494.     -DSEVERITY=$(SEVERITY) -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) \
  495.     $(UCHAR) $(TABLES) $(STRINGS) $(TLI) $(EXTRA_CFLAGS) $(DOT)
  496.  
  497. LIB_OBJ= hosts_access.o options.o shell_cmd.o rfc931.o hosts_info.o \
  498.     hosts_ctl.o refuse.o percent_x.o clean_exit.o $(AUX_OBJ) \
  499.     fromhost.o fix_options.o socket.o tli.o workarounds.o init_client.o \
  500.     6compat.o
  501.  
  502. KIT    = README miscd.c tcpd.c fromhost.c hosts_access.c shell_cmd.c \
  503.     log_tcp.h try.c refuse.c Makefile hosts_access.5 strcasecmp.c \
  504.     BLURB rfc931.c tcpd.8 hosts_info.c hosts_access.3 hosts_ctl.c \
  505.     percent_x.c options.c clean_exit.c environ.c patchlevel.h strtok.c \
  506.     fix_options.c workarounds.c socket.c tli.c DISCLAIMER \
  507.     fakelog.c safe_finger.c hosts_options.5 options.h CHANGES \
  508.     try-from.c init_client.c 6compat.c ptx.c vfprintf.c tli-sequent.c \
  509.     tli-sequent.h
  510.  
  511. LIB    = libwrap.a
  512.  
  513. all other: config-check tcpd try try-from safe_finger
  514.  
  515. config-check:
  516.     @set +e; test -n "$(REAL_DAEMON_DIR)" || { make; exit 1; }
  517.  
  518. $(LIB):    $(LIB_OBJ)
  519.     rm -f $(LIB)
  520.     ar $(ARFLAGS) $(LIB) $(LIB_OBJ)
  521.     -$(RANLIB) $(LIB)
  522.  
  523. tcpd:    tcpd.o fromhost.o $(LIB)
  524.     $(CC) $(CFLAGS) -o $@ tcpd.o fromhost.o $(LIB) $(LIBS)
  525.  
  526. miscd:    miscd.o fromhost.o $(LIB)
  527.     $(CC) $(CFLAGS) -o $@ miscd.o fromhost.o $(LIB) $(LIBS)
  528.  
  529. safe_finger:
  530.     $(CC) $(CFLAGS) -o $@ safe_finger.c $(LIB) $(LIBS)
  531.  
  532. try:    try.o fakelog.o $(LIB)
  533.     $(CC) $(CFLAGS) -o $@ try.o fakelog.o $(LIB) $(LIBS)
  534.  
  535. try-from: try-from.c fakelog.o log_tcp.h Makefile $(LIB)
  536.     $(CC) $(CFLAGS) -DTEST -o $@ try-from.c fakelog.o $(LIB) $(LIBS)
  537.  
  538. shar:    $(KIT)
  539.     @shar $(KIT)
  540.  
  541. kit:    $(KIT)
  542.     @makekit $(KIT)
  543.  
  544. archive:
  545.     $(ARCHIVE) $(KIT)
  546.  
  547. clean:
  548.     rm -f tcpd miscd safe_finger try try-from *.[oa] core
  549.  
  550. # Enable all bells and whistles for linting.
  551.  
  552. lint: tcpd_lint miscd_lint try_lint
  553.  
  554. tcpd_lint:
  555.     lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
  556.     -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
  557.     $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
  558.     -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
  559.     -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" \
  560.     tcpd.c fromhost.c socket.c tli.c hosts_access.c shell_cmd.c \
  561.     refuse.c rfc931.c hosts_info.c percent_x.c clean_exit.c options.c \
  562.     environ.c fix_options.c workarounds.c init_client.c
  563.  
  564. miscd_lint:
  565.     lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
  566.     -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
  567.     $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
  568.     -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
  569.     -DREAL_MISCD=\"$(REAL_DAEMON_DIR)/miscd\" \
  570.     miscd.c fromhost.c socket.c tli.c hosts_access.c shell_cmd.c \
  571.     refuse.c rfc931.c hosts_info.c percent_x.c clean_exit.c options.c \
  572.     environ.c fix_options.c workarounds.c init_client.c
  573.  
  574. try_lint:
  575.     lint -DFACILITY=LOG_MAIL -DSEVERITY=$(SEVERITY) -DHOSTS_ACCESS \
  576.     $(TABLES) -DNETGROUP -DPROCESS_OPTIONS -DRFC931_TIMEOUT=10 \
  577.     try.c hosts_ctl.c hosts_access.c hosts_info.c percent_x.c options.c \
  578.     workarounds.c init_client.c
  579.  
  580. printfck:
  581.     printfck -f printf.ck tcpd.c fromhost.c socket.c tli.c hosts_access.c shell_cmd.c \
  582.     refuse.c rfc931.c hosts_info.c percent_x.c clean_exit.c options.c \
  583.     environ.c fix_options.c workarounds.c init_client.c >aap.c
  584.     lint -DFACILITY=LOG_MAIL -DHOSTS_ACCESS -DPARANOID -DNETGROUP \
  585.     -DGETPEERNAME_BUG -DDAEMON_UMASK=022 -DSEVERITY=$(SEVERITY) \
  586.     $(TABLES) -DKILL_IP_OPTIONS -DPROCESS_OPTIONS \
  587.     -DRFC931_TIMEOUT=$(RFC931_TIMEOUT) -DALWAYS_RFC931 \
  588.     -DREAL_DAEMON_DIR=\"$(REAL_DAEMON_DIR)\" aap.c
  589.     rm -f aap.c
  590.  
  591. # Compilation dependencies.
  592.  
  593. clean_exit.o: log_tcp.h Makefile
  594. environ.o: Makefile
  595. fix_options.o: log_tcp.h Makefile
  596. fromhost.o: log_tcp.h Makefile
  597. hosts_access.o: options.h log_tcp.h Makefile
  598. hosts_ctl.o: log_tcp.h Makefile
  599. hosts_info.o: log_tcp.h Makefile
  600. init_client.o: log_tcp.h Makefile
  601. miscd.o: patchlevel.h log_tcp.h Makefile
  602. options.o: options.h log_tcp.h Makefile
  603. percent_x.o: log_tcp.h Makefile
  604. refuse.o: log_tcp.h Makefile
  605. rfc931.o: log_tcp.h Makefile
  606. shell_cmd.o: log_tcp.h Makefile
  607. socket.o: log_tcp.h Makefile
  608. tcpd.o: patchlevel.h log_tcp.h Makefile
  609. tli.o: log_tcp.h Makefile
  610. tli-sequent.o: tli-sequent.h log_tcp.h Makefile
  611. try-from: log_tcp.h Makefile
  612. try.o: log_tcp.h Makefile
  613. workarounds.o: log_tcp.h Makefile
  614.